{-
    ScoreMetrics.hs: Functions to measure the effictiveness of a roll.
    ----------------------------------------------------------------------------
    Version: 1.0alpha1
    Author:  Christopher Granade (cgranade@gmail.com)
    ----------------------------------------------------------------------------
    This file is a part of the Die Rolling Analysis Toolkit (DRAT) project.
    http://drat.googlecode.com/
    ----------------------------------------------------------------------------
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 or 3 of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    ----------------------------------------------------------------------------
    (c) 2007 Christopher E. Granade
-}
module ScoreMetrics where

	{- Costs for stats by D&D 3.5 point-buy rules. -}
    dd35metric :: (Integral a) => [a] -> a
    dd35metric [xs] = sum (map dd35metric' xs)
    dd35metric' s = case s of
        8 -> 0
        9 -> 1
        10 -> 2
        11 -> 3
        12 -> 4
        13 -> 5
        14 -> 6
        15 -> 8
        16 -> 10
        17 -> 13
        18 -> 16